#!user/bin/env python3
# -- coding: utf-8 --
# @Createtime：2023/9/10
# @Updatetime：9:47
# @Author：Test008
# @File：10-多继承.py
# @Description：设定一个小米手机类，它继承手机类，NFC功能类，红外遥控类的功能
"""
多继承时，遇到同名的成员变量，成员方法，按照从左到右的优先级继承
"""


class Phone:
    IMEI = None  # 序列号
    producer = None  # 厂商

    def call_by_5g(self):
        print("5g通话")


class NFCReader:
    nfc_type = "第五代"
    producer = "三星"

    def read_card(self):
        print("读取NFC")

    def write_card(self):
        print("写入NFC")


class Remotercontrol:
    rc_type = "红外功能"

    def remoter_control(self):
        print("红外遥控开关")


class XiaomiPhone(Phone, NFCReader, Remotercontrol):
    pass


new_phone = XiaomiPhone()
new_phone.remoter_control()
new_phone.call_by_5g()
